package cn.liulin.llrenjianjie.controller;

import cn.liulin.llcommon.pojo.response.ResObj;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * cn.liulin.llrenjianjie.controller$
 *
 * @author ll
 * @date 2022-01-17 16:47:41
 **/
@RestController
@RequestMapping("/renjianjie/port")
public class PortController {
    @Resource
    private RestTemplate restTemplate;

    @GetMapping("/getPort")
    public ResObj getPort() {
        String url = "http://LL-XIANJIE/xianjie/balance/getPort";
        ResObj resObj = restTemplate.getForEntity(url, ResObj.class).getBody();
        return ResObj.ok(resObj.getData());
    }
}
